Skip to main content

Contributors: Jellejurre, JustSleightly

Expression Parameter Mismatching

In typical VRChat Avatars 3.0 creation, VRChat expression parameters are expected to be set as the same parameter type (Bool, Int, Float) as their respective local animator parameter counterparts.

However, parameters between your Expression Parameters vs your local animator parameters can have mismatched parameter types and still function. This behaviour differs from type to type, and is documented below.

A parameter labeled Toggle added to VRChat Expression Parameters as a Bool

A parameter labeled Toggle added to VRChat Expression Parameters as a Bool

A parameter labeled Toggle added to local animator parameters as a Float

A parameter labeled Toggle added to local animator parameters as a Float


Verified Parameter Mismatch Behaviour:

Expression Parameter Bool:

Animator Controller ParameterExpression Bool = FalseExpression Bool = True
Bool → BoolBool = FalseBool = True
Bool → IntInt = 0Int = 1
Bool → FloatFloat = 0.0Float = 1.0

Expression Parameter Int:

Animator Controller ParameterBehaviour
Int → BoolAny Int value that isn’t 0 sets bool to True
Int → IntExpected Behaviour
Int → FloatStraight Conversion: Ex: Int = 2 → Float = 2.0

Expression Parameter Float:

Animator Controller ParameterBehaviour
Float → BoolAny Float value that isn’t 0 sets bool to True
Float → IntRounded Conversion: ≥0.5 → 1 : <0.5 → 0
Float → FloatExpected Behaviour

Why does mismatching work?

Unity Animators use floats on the C# back-end regardless of parameter type, while VRChat uses SBytes instead of bools, ints, or floats.

The Animator window and VRCSDK themselves makes the user experience simpler by allowing you to select the parameter types from the interface.

In this sense, the parameters are not being casted but mismatched.

Mismatching parameters also works with the VRChat native parameters.


Testing in Unity

At this time of writing:

Av3Emulator has implemented the above parameter mismatching behaviour.

Gesture Manager has implemented the above parameter mismatching behaviour for all parameters but vrc builtin parameters, but is working on that for their 3.8.9 release.


Last Updated: 31 March 2024 08:54:00